import request from '@/utils/request';

// 主平台 列表删除
export async function PayTheBillDelete(data) {
  const res = await request.post('/business/wxpayanorder/delete', data);
  if (res.data.code === 2000) {
    return res.data;
  }
  // console.log(res)
  // return res
  return Promise.reject(new Error(res));
}

// 主平台佣金列表头部佣金账单
export async function getCommissionBill(data = {}) {
  const res = await request.post(
    '/business/wxbrokerageorder/getBrokerageOrder',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  // console.log(res)
  // return res
  return Promise.reject(new Error(res));
}

//   获取主平台支付列表

export async function getCommissionBillList(data) {
  const res = await request.post(
    '/business/wxpayanorder/forecastPageList',
    data
  );
  if (res.data.code === 2000) {
    return res.data.data;
  }
  // console.log(res)
  // return res
  return Promise.reject(new Error(res));
}

export async function getWxbrokerageorderList(data) {
	const res = await request.post(
	  '/business/wxbrokerageorder/pageList',
	  data
	);
	if (res.data.code === 2000) {
	  return res.data.data;
	}
	// console.log(res)
	// return res
	return Promise.reject(new Error(res));
  }
  
